<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Friends.aspx.cs" Inherits="Matrix_network.PeopleLists.People" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PageHeaderContent" runat="server">
    <asp:Literal Text = "<%$ Resources: Friends %>" runat="server"></asp:Literal>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="PeopleGridView" runat="server" AutoGenerateColumns="False" 
        DataSourceID="MatrixDataSrc" ShowHeader="False" CssClass="gridInfo" 
        GridLines="None">
        <Columns>
            <asp:ImageField DataImageUrlField="ava_id" 
                DataImageUrlFormatString="~/Photo/{0}" NullImageUrl="../Images/no_avatar.png">
                <ControlStyle CssClass="smallAvatars" />
            </asp:ImageField>
            <asp:BoundField DataField="ava_id" NullDisplayText="<%$ Resources: BoundFieldAvaPic.NullDisplayText %>" SortExpression="ava_id" Visible="false" />
            <asp:BoundField DataField="friend_id" SortExpression="friend_id" Visible="false"/>
            <asp:BoundField DataField="name" SortExpression="name"/>
            <asp:BoundField DataField="surname" SortExpression="surname"/>
            <asp:HyperLinkField DataNavigateUrlFields="friend_id" 
                DataNavigateUrlFormatString="~/ViewProfile.aspx?id={0}" Text="<%$ Resources: HLFieldProfile.Text %>" />
            <asp:HyperLinkField DataNavigateUrlFields="friend_id" 
                DataNavigateUrlFormatString="~/SendMessage.aspx?toId={0}" Text="<%$ Resources: HyperLinkFieldWrite.Text %>" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="MatrixDataSrc" runat="server" 
        ConnectionString="<%$ ConnectionStrings:TheMatrixNetConnectionString %>" 
        
        
        
        
        SelectCommand="SELECT friends.friend_id, users.name, users.surname, users.ava_id FROM friends INNER JOIN users ON friends.friend_id = users.id WHERE (friends.usr_id = @usr_id)">
        <SelectParameters>
            <asp:SessionParameter Name="usr_id" SessionField="usr_id" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>
